package Smartphone;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class ValidTest {
	


	public ValidTest()
	{

	}
	
	public boolean ValidPhone(String phone)
	{
		Pattern pattern = Pattern.compile("\\d{10}");
		Matcher match = pattern.matcher(phone);
		return match.matches();
	}
	
	public boolean ValidName(String firstname)
	{
		Pattern pattern = Pattern.compile("[A-Z]");
		if(firstname.length() == 0) return false;
		Matcher match = pattern.matcher(firstname);
		return match.matches();
	}

}

